import request from '@/api/request.js'

//详情
export const gettravelbyidAPI = (params) => {
  return request.post('/app/gettravelbyid', params)
}
//获取我的行程
export const getmytravelsAPI = (params) => {
  return request.post('/app/getmytravels', params)
}
//上传文件
export const uplodafileAPI = (params) => {
  return request.post('/app/uplodafile', params)
}
//新增
export const addtravelsAPI = (params) => {
  return request.post('/app/addtravels', params)
}
//评论
export const addpingsoneAPI = (params) => {
  return request.post('/app/addpingsone', params)
}
//热度+1
export const changetravelsAPI = (params) => {
  return request.post('/app/changetravels', params)
}
//评论显示
export const getpinglistAPI = (params) => {
  return request.post('/app/getpinglist', params)
}


//添加喜欢
// phone:"18576617045"
// tid:"6405e2949857e24a510cf286"
// travel:{tags: [{label: "酒店", value: 1, color: "#2db7f5", check: true}], imgs: [{,…}],…}
// userInfo:{_id: "6402babeef0f230664c1d374", username: "1234", phone: "18576617045", password: "a123456",…}
export const addcollectoneAPI = (params) => {
  return request.post('/app/addcollectone', params)
}

//删除喜欢
//phone:"18576617045"  tid:"6405e2949857e24a510cf286"
export const delcollectoneAPI = (params) => {
  return request.post('/app/delcollectone', params)
}

//添加点赞
// phone:"18576617045"
// tid:"6405e2949857e24a510cf286"
// travel:{tags: [{label: "酒店", value: 1, color: "#2db7f5", check: true}], imgs: [{,…}],…}
// userInfo:{_id: "6402babeef0f230664c1d374", username: "1234", phone: "18576617045", password: "a123456",…}
export const addlikeoneAPI = (params) => {
  return request.post('/app/addlikeone', params)
}

//删除点赞
//phone:"18576617045"  tid:"6405e2949857e24a510cf286"
export const dellikeoneAPI = (params) => {
  return request.post('/app/dellikeone', params)
}
//查看喜欢
// flag:true  tid :"6405e2949857e24a510cf286"
export const getcollectlistAPI = (params) => {
  return request.post('/app/getcollectlist', params)
}
//查看点赞
// flag:true  tid :"6405e2949857e24a510cf286"
export const getlikelistAPI = (params) => {
  return request.post('/app/getlikelist', params)
}

// 获取用户信息
export const GetUserInfoAPI = () => {
  return request.get('/app/getuserinfo')
}

